package com.jay.base.thread.NewThreadType;

import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by caoyuan7 on 2019/7/18.
 */
public class Demo5 {
    public static void main(String[] args) {

        Timer timer = new Timer();

        timer.schedule(new TimerTask() {

            @Override
            public void run() {
                // 实现定时任务
                System.out.println("timertask is run");
            }
        }, 0, 3000);

    }
}
